package org.example;

import java.util.List;

/**
 * @version: 1
 * @description: java
 * @author: java
 * @create: 2020-06-04 13:54
 **/
public class TestGeneric5 {

    public static void main(String[] args) {
//        addString(new Person3());
        TestGeneric5 tg = new TestGeneric5();
//        tg.addStirng2(new Stu1());

    }

    public static void addString(List<? extends Object> list) {
//        list.add(new Person3());
    }

    public void addStirng2(List<? super Stu1> list) {
        list.add(new Stu1());
//        list.add(new Person3());
    }
}

class Person3 {

}
class Stu1 extends Person3 {

}
class Stu2 extends Stu1 {

}


